Skip to content

Add a retry mechanism for fetching setup executable #26

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Apr 9, 2025

Conversation

jon-turney
Copy link
Member

@jon-turney jon-turney commented Mar 26, 2025

Closes #9

@gstrauss
Copy link
Contributor

10 seconds between retries seems a bit long to me. Maybe 2 or 3 seconds instead? The rest looks good to me.

@gstrauss
Copy link
Contributor

gstrauss commented Apr 7, 2025

While repeatedly running CI tests for #27, I encountered more than a few spurious Invoke-WebRequest failures not only for setup.exe, but also for downloading checksum hashes. I would recommend wrapping all Invoke-WebRequest calls with a retry mechanism. It is too bad that MS did not make Invoke-WebRequest more robust, or at least configurable to be more robust.

@jon-turney
Copy link
Member Author

Yeah, unfortunately sourceware is getting hammered by LLM scraperbots at the moment ☹️

@jon-turney jon-turney force-pushed the retry branch 7 times, most recently from 8cb59b1 to e624e5d Compare April 9, 2025 18:29
Also, don't use a naked catch, so we don't trap sytnax or usage errors
etc., only network failures.
@jon-turney jon-turney merged commit e67b1f4 into cygwin:master Apr 9, 2025
14 checks passed
@jon-turney jon-turney deleted the retry branch April 9, 2025 20:02
@vszakats
Copy link

vszakats commented Apr 9, 2025

Thanks @jon-turney!

vszakats added a commit to curl/curl that referenced this pull request Apr 12, 2025
- to benefit from the new download retry mechanism.
  cygwin/cygwin-install-action#26

- to use a new setting that not only moves the Cygwin install target
  directory to the faster `D:` drive, but also the package download
  directory. Expecting a little performance improvement from this for
  the Cygwin install step.
  cygwin/cygwin-install-action@d3a7464
  cygwin/cygwin-install-action#27

Closes #17040
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Invoke-WebRequest to "https://cygwin.com/setup-$platform.exe" failing sporadically
3 participants